import request from "@/utils/request";

// 获取结算信息
export const getCheckoutInfo = () => request("/member/order/pre", "get");

// 添加收货地址
export const insertAddress = (data) => request("/member/address", "post", data);

// 获取收货地址
export const getAddress = () => request("/member/address", "get");

// 修改收货地址
export const updateAddress = (data) =>
  request(`/member/address/${data.id}`, "put", data);

// 提交订单
export const createOrder = (data) => request("/member/order", "post", data);

// 获取订单信息
export const getOrderInfo = (id) => request(`/member/order/${id}`, "get");
